//
//  textin4.cpp
//  learncpp_cli
//
//  Created by 李燚 on 2022/10/22.
//

#include <iostream>

int main(int argc, const char * argv[]) {
    int ch;
    int count = 0;
    while ((ch = std::cin.get()) != EOF) {
        std::cout.put(char(ch));
        ++count;
    }
    std::cout << std::endl << count << " characters read\n";
    return 0;
}
